package com.zhentao.tot.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * App文章对象 ap_article
 *
 * @author ruoyi
 * @date 2025-04-23
 */
@Data
public class ApArticle extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Integer id;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 文章作者的ID */
    @Excel(name = "文章作者的ID")
    private Integer authorId;

    /** 作者昵称 */
    @Excel(name = "作者昵称")
    private String authorName;

    /** 文章所属频道ID */
    @Excel(name = "文章所属频道ID")
    private Integer channelId;

    /** 频道名称 */
    @Excel(name = "频道名称")
    private String channelName;

    /** 文章布局 0 无图文章 1 单图文章 2多图文章 */
    @Excel(name = "文章布局 0 无图文章 1 单图文章 2多图文章")
    private Integer layout;

    /** 文章标记 0 普通文章 1热点文章 2 置顶文章 3精品文章 4 大V文章 */
    @Excel(name = "文章标记 0 普通文章 1热点文章 2 置顶文章 3精品文章 4 大V文章")
    private Long flag;

    /** 文章图片 多张逗号分隔 */
    @Excel(name = "文章图片 多张逗号分隔")
    private String images;

    /** 文章标签最多3个 逗号分隔 */
    @Excel(name = "文章标签最多3个 逗号分隔")
    private String labels;

    /** 点赞数量 */
    @Excel(name = "点赞数量")
    private Integer likes;

    /** 收藏数量 */
    @Excel(name = "收藏数量")
    private Integer collection;

    /** 评论数量 */
    @Excel(name = "评论数量")
    private Integer comment;

    /** 阅读数量 */
    @Excel(name = "阅读数量")
    private Integer views;

    /** 省市 */
    @Excel(name = "省市")
    private Integer provinceId;

    /** 市区 */
    @Excel(name = "市区")
    private Integer cityId;

    /** 区县 */
    @Excel(name = "区县")
    private Integer countyId;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /** 发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishTime;

    /** 同步状态 */
    @Excel(name = "同步状态")
    private Integer syncStatus;

    /** 来源 */
    @Excel(name = "来源")
    private Integer origin;

    /** 静态网址 */
    @Excel(name = "静态网址")
    private String staticUrl;

    @TableField(exist = false)
    private String content;
    @TableField(exist = false)
    private List<ApArticleContent> apArticleContent;
    public void setId(Integer id)
    {
        this.id = id;
    }

    public Integer getId()
    {
        return id;
    }

    public void setTitle(String title)
    {
        this.title = title;
    }

    public String getTitle()
    {
        return title;
    }

    public void setAuthorId(Integer authorId)
    {
        this.authorId = authorId;
    }

    public Integer getAuthorId()
    {
        return authorId;
    }

    public void setAuthorName(String authorName)
    {
        this.authorName = authorName;
    }

    public String getAuthorName()
    {
        return authorName;
    }

    public void setChannelId(Integer channelId)
    {
        this.channelId = channelId;
    }

    public Integer getChannelId()
    {
        return channelId;
    }

    public void setChannelName(String channelName)
    {
        this.channelName = channelName;
    }

    public String getChannelName()
    {
        return channelName;
    }

    public void setLayout(Integer layout)
    {
        this.layout = layout;
    }

    public Integer getLayout()
    {
        return layout;
    }

    public void setFlag(Long flag)
    {
        this.flag = flag;
    }

    public Long getFlag()
    {
        return flag;
    }

    public void setImages(String images)
    {
        this.images = images;
    }

    public String getImages()
    {
        return images;
    }

    public void setLabels(String labels)
    {
        this.labels = labels;
    }

    public String getLabels()
    {
        return labels;
    }

    public void setLikes(Integer likes)
    {
        this.likes = likes;
    }

    public Integer getLikes()
    {
        return likes;
    }

    public void setCollection(Integer collection)
    {
        this.collection = collection;
    }

    public Integer getCollection()
    {
        return collection;
    }

    public void setComment(Integer comment)
    {
        this.comment = comment;
    }

    public Integer getComment()
    {
        return comment;
    }

    public void setViews(Integer views)
    {
        this.views = views;
    }

    public Integer getViews()
    {
        return views;
    }

    public void setProvinceId(Integer provinceId)
    {
        this.provinceId = provinceId;
    }

    public Integer getProvinceId()
    {
        return provinceId;
    }

    public void setCityId(Integer cityId)
    {
        this.cityId = cityId;
    }

    public Integer getCityId()
    {
        return cityId;
    }

    public void setCountyId(Integer countyId)
    {
        this.countyId = countyId;
    }

    public Integer getCountyId()
    {
        return countyId;
    }

    public void setCreatedTime(Date createdTime)
    {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime()
    {
        return createdTime;
    }

    public void setPublishTime(Date publishTime)
    {
        this.publishTime = publishTime;
    }

    public Date getPublishTime()
    {
        return publishTime;
    }

    public void setSyncStatus(Integer syncStatus)
    {
        this.syncStatus = syncStatus;
    }

    public Integer getSyncStatus()
    {
        return syncStatus;
    }

    public void setOrigin(Integer origin)
    {
        this.origin = origin;
    }

    public Integer getOrigin()
    {
        return origin;
    }

    public void setStaticUrl(String staticUrl)
    {
        this.staticUrl = staticUrl;
    }

    public String getStaticUrl()
    {
        return staticUrl;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("authorId", getAuthorId())
            .append("authorName", getAuthorName())
            .append("channelId", getChannelId())
            .append("channelName", getChannelName())
            .append("layout", getLayout())
            .append("flag", getFlag())
            .append("images", getImages())
            .append("labels", getLabels())
            .append("likes", getLikes())
            .append("collection", getCollection())
            .append("comment", getComment())
            .append("views", getViews())
            .append("provinceId", getProvinceId())
            .append("cityId", getCityId())
            .append("countyId", getCountyId())
            .append("createdTime", getCreatedTime())
            .append("publishTime", getPublishTime())
            .append("syncStatus", getSyncStatus())
            .append("origin", getOrigin())
            .append("staticUrl", getStaticUrl())
            .toString();
    }
}
